Update Assessment Task
Introduction
The following Assetic REST API endpoint may be used to update an Assessment Task:
-
PUT /api/v2/assessmenttask/{id}
This API requires the GUID of the assessment task to be known, represented as {id} in the above request endpoint. Use the Assetic REST APIs GET /api/v2/assessmenttask or GET /api/v2/assessmenttask/{id} to first retrieve an assessment task to be updated, as outlined in the article Get Assessment Tasks.
NOTE It is not possible to add, remove, or update an assessment's tasks 'Required Forms' using the endpoint PUT /api/v2/assessmenttask/{id}
Assessment Task Fields
The following properties are relevant for the purposes of updating an Assessment Task:
Property | Description | Type |
Id | The unique Assetic GUID, which identifies the assessment task. Must be included in the request body and the request URL. | GUID |
AsmtProjectId |
The Assetic GUID of an assessment project that the assessment tank is linked to. If not provided, the assessment task will be unlinked from an assessment project. Refer to the integration article Create Assessment Project for additional information about creating assessment projects using the Brightly Assetic REST API in order to capture the assessment project's GUID. |
GUID |
Status |
The current status of the assessment task. "Open" (300) "Completed" (500) |
String |
RsResourceIdAssignedTo |
An object containing an "Id" property with the GUID of the resource assigned to the assessment task. See the Get Resources article for additional information on retrieving resource details. |
Object |
Name | The user-friendly name of the assessment task. | String |
StartDate | The date the assessment begins. | DateTime |
EndDate | The date the assessment ends. | DateTime |
CompletionDate | The date the assessment was completed. | DateTime |
Comments | General comments for the assessment task. 4000 character limit. | String |
ExternalIdentifier | A reference to an external identifier. | String |
TaskTypeId |
An identifier for the type of Task. Use TaskTypeId = '1'. |
Integer |
The "LastModified" property of a task is automatically updated by the system on change to reflect the DateTime that the assessment task was last updated.
Sample Payload
The following sample PUT payload updates the properties of an assessment task.
Request
In this example payload, the 'Status' property has been updated to 'Completed' to indicate the assessment is finished, and the DateTime of "2023-01-23T00:00:00" has been provided for 'CompletionDate'.
https://[yoursite].assetic.net/api/v2/assessmenttask/3108d1ad-515c-4b33-9b92-ca86ea982b09
{
"Id": "3108d1ad-515c-4b33-9b92-ca86ea982b09",
"AsmtProjectId": "90574ba5-1df4-486e-af7a-fcaa44ee9964",
"Status": "Completed",
"RsResourceIdAssignedTo": {
"Id": "1a0497f6-31dd-e611-946c-06edd62954d7",
"DisplayName": "Roger Federer",
"_links": [],
"_embedded": null
},
"Name": "Assess SDR690912 - Claret Loop",
"TaskId": "TASK016334",
"StartDate": "2023-01-01T00:00:00",
"EndDate": "2023-01-31T00:00:00",
"CompletionDate": "2023-01-23T00:00:00",
"Priority": 0,
"ResultsCount": 1,
"Comments": "Assessment has been completed.",
"LastModified": "2023-01-20T15:02:55",
"CreatedDateTime": "2023-01-20T15:02:55",
"ExternalIdentifier": null,
"TaskTypeId": 1
}
Response
If successful there is no response body.
The response code is 200.